
/**
 * Class representing a neuron from the hidden layer ( the middle one ).
 * Override the activation function and it's derivative 
 *
 */
public class HiddenNeuron extends AbstractNeuron {	
	
	@Override
	protected double activationFunction(double e) {
		return 1 / (1 + Math.exp(-1 * e));
	}

	@Override
	protected double activationFunctionDerivative(double e) {
		// This call is always made after a call to computeValue(), which allow us to use value instead of calling
		// activationFunction(e) 
		return value * (1 - value);
	}

}
